Skip to main content
Version: 2.0

How to configure AppKit (Android)

Introduction

AppKit is the top layer of the Huma SDK and is required to be configured to use the SDK with Huma Platform. It is the layer that integrates the Foundation and SDK layers and provides a set of features that are ready to use.

Configuration

context.installHumaSdk {
appKit {
// (Optional) Tab providers to be used for setting tabs for Main user flow.
// By default two tabs are provided, Widget based and Generic (ToDo, Track, Learn, Profile)
// Set your tab providers to override the default tabs
setTabProviders(TabProvider1(), TabProvider2(), ...)
// Adds a tab providers to the list of existing tab providers
addTabProviders(TabProvider3(), TabProvider4(), ...)
// (Optional) Tab order provider to be used for reordering tabs provided by TapProviders
tabOrderProvider = TabOrderProvider()
// (Optional, but recommended) Set the product configuration for the app
setProductConfig(
context = context,
productName = "Product Name",
versionName = "Product Version",
versionCode = "Product Code",
)
}
actions {
// (Optional) Set the action processors for the app to handle Huma specific key actions
processors = listOf(ActionProcessor1(), ActionProcessor2(), ...)
}
auth {
// (Optional) Enable or disable manual signup, by default it is false
manualSignup = true / false
// (Optional) Enable or disable retaining credentials, by default it is false
retainCredentials = true / false
// (Optional) Enable or disable manual deployment switch, by default it is false
manualDeploymentSwitch = true / false
// (Optional) List of auth types to be used for authentication, by default it is Email
authTypes = listOf<AuthType>
}
modules {
// (Optional) Set the module processors for the app to handle Huma specific modules.
// Most of the module processors are injected by default when dependencies are added
installModules(
ModuleProcessor1(),
ModuleProcessor2(),
...
)
}
onboarding {
// (Optional) Set to true if you want to override the default onboarding steps, by default it is false
overrideDefault = true / false
// (Optional) Override the consent repository to be used for fetching consents
consentRepository = ConsentRepository()
// (Optional) Override the verification repository to be used for fetching verifications
verificationRepo = VerificationRepo()
// (Optional) Override the profile questionnaire repository to be used for fetching profile questionnaires
profileQuestionnaireRepo = ProfileQuestionnaireRepo()
// (Optional) Enable offboarding notification in foreground, by default it is true
showOffboardingNotificationInForeground = true / false
// (Optional) Set the offboarding screen configuration
offboardingScreenConfig = OffboardingScreenConfig()

steps( // List of onboarding steps to be added or overridden for onboarding
OnboardingStep1(),
OnboardingStep2(),
...
)
}
profile {
// (Optional) Set the profile settings repository for profile screen, it's recommended to use settings{} block to step up the profile settings
profileSettingsRepository = ProfileSettingsRepository()
// (Optional) Proxy helper repository to be used for fetching proxy helper data
proxyHelperRepo = ProxyHelperRepo()
// (Optional) Edit profile repository to be used for editing profile
editProfileRepo = EditProfileRepo()
// (Optional) Config for Intercom integration in profile section (https://www.intercom.com)
supportConfig = SupportConfig()
// (Optional) Personal documents config to be used for personal documents
personalDocumentsConfig = PersonalDocumentsConfig()
// (Optional) Set to false if you want to disable 2FA in account details, by default it is true
put2FAtoAccountDetails = true / false
// (Optional) Set to true if you want to add sharing button to About section documents, by default it is false
shareAboutDocuments = true / false
// (Optional) Set to false if you want to disable mandatory date of birth in profile, by default it is true
isDateOfBirthMandatory = true / false
// (Optional, but recommended) Set the App version in profile settings, used to display the version in the profile about screen
appVersionInfo = AppVersionInfo()
}
questionnaire {
// Use to add more question types to the questionnaire engine
questions = listOf<RegisterQuestionParams>()
// For questions that use validation flow both local and remote
commonValidator = CommonValidator()
}
units {
// (Optional) List of units to be used for preferred units flow. By default it is empty and set by AppKit
configSource = PreferredUnitsConfigSource()
}
}

Previous Steps